<?php
include("../inc/global.inc");
include("../inc/fun.php");
include("../steps.php");
if($_POST[act]){
$psw=substr(md5($_POST['psw']),7,19);

@mysql_query("update job_per set p_psw='$psw' where id='$_COOKIE[job_user_id]'");

echo "<script>alert('密码修改成功');location='index.php'</script>";

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>简历中心-三帝招聘网</title>
<link href="../css/body.css" rel="stylesheet" type="text/css"/>
<link href="../css/link.css" rel="stylesheet" type="text/css"/>
<link href="css/head.css" rel="stylesheet" type="text/css"/>
<link href="css/main.css" rel="stylesheet" type="text/css"/>
<link href="../css/foot.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<?php include("../inc/top.php");?>
<div class="menuBox1">
<a href="/member/" class="hover">管理中心</a>
<a href="/member/show.php">我的简历</a>
<a href="/member/search_manage.php">我的搜索器</a>
<a href="/member/favorites.php">收藏夹</a>
<a href="/member/cqjob.php">发件夹</a>
<a href="/member/inbox.php">收件夹</a>
<div class="onl"></div>
</div>
<div id="mian">
<?php include("right.php");?>
<div id="box">
  <div class="JobBox sideyellow backyellow">
  <div class="mian_Co">
    <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
	  <form method="post" action="" onsubmit="return check()">
      <tbody>
        <tr>
          <td width="22%" height="30" align="center">新密码</td>
          <td width="78%"><input name="psw" type="password" size="20" maxlength="20" /></td>
        </tr>
        <tr>
          <td height="30" align="center">确认新密码</td>
          <td><input name="psw2" type="password" size="20" maxlength="20" /></td>
        </tr>
        <tr><input type="hidden" name="act" value="ok" />
          <td height="30" align="center">&nbsp;</td>
          <td><input type="submit" value="提交" /></td>
        </tr>
		</form>
    </table>
  </div>
</div>
<div class="onl"></div>
<div class="onl"></div>
</div>
<div class="onl"></div>
</div>
<?php include("../inc/foot.php"); ?>
</div>
</body>
</html>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function check(){
if($("psw").value==""){
alert("新密码不能为空");
$("psw").focus();
return false;
}
if($("psw").value!=$("psw2").value){
alert("您两次的密码不一致");
$("psw2").focus();
return false;
}
}
</script>